package com.ayz.gateway.center.domain.model;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @ClassName GatewayServiceLiveInfo
 * @Description TODO: 网关服务的心跳信息类
 * @Author 快乐的星球
 * @Date 2023/5/25 20:05
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
public class GatewayServiceLiveInfo {
    /**
     * 上一次心跳的时间戳
     */
    private long lastHeartBeatTimestamp;
    /**
     * 网关名称
     */
    private String gatewayName;
    /**
     * 网关业务组的名称
     */
    private String gatewayGroup;
    /**
     * 网关服务唯一标识ID
     */
    private String gatewayId;

    public GatewayServiceLiveInfo(String gatewayName, String gatewayGroup, String gatewayId) {
        this.gatewayName = gatewayName;
        this.gatewayGroup = gatewayGroup;
        this.gatewayId = gatewayId;
        this.lastHeartBeatTimestamp=System.currentTimeMillis();
    }
}
